import NProgress from 'nprogress'
import 'nprogress/nprogress.css'
import router from '@/router'

NProgress.configure({
    showSpinner: false
})

router.beforeEach((to: object, from: object, next: () => void) => {
    NProgress.start()
    next()
    // TODO 判断是否已经登录
    console.log(to, from)
})

router.afterEach(() => {
    NProgress.done()
})
